package com.st.model;

import java.util.Date;

/**
 * LjwUserRoleProgramTId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class LjwUserRoleProgramTId implements java.io.Serializable {

	// Fields

	private Integer userId;
	private Integer roleId;
	private Integer programId;
	private Date creationDate;

	// Constructors

	/** default constructor */
	public LjwUserRoleProgramTId() {
	}

	/** full constructor */
	public LjwUserRoleProgramTId(Integer userId, Integer roleId,
			Integer programId, Date creationDate) {
		this.userId = userId;
		this.roleId = roleId;
		this.programId = programId;
		this.creationDate = creationDate;
	}

	// Property accessors

	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getRoleId() {
		return this.roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	public Integer getProgramId() {
		return this.programId;
	}

	public void setProgramId(Integer programId) {
		this.programId = programId;
	}

	public Date getCreationDate() {
		return this.creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof LjwUserRoleProgramTId))
			return false;
		LjwUserRoleProgramTId castOther = (LjwUserRoleProgramTId) other;

		return ((this.getUserId() == castOther.getUserId()) || (this
				.getUserId() != null
				&& castOther.getUserId() != null && this.getUserId().equals(
				castOther.getUserId())))
				&& ((this.getRoleId() == castOther.getRoleId()) || (this
						.getRoleId() != null
						&& castOther.getRoleId() != null && this.getRoleId()
						.equals(castOther.getRoleId())))
				&& ((this.getProgramId() == castOther.getProgramId()) || (this
						.getProgramId() != null
						&& castOther.getProgramId() != null && this
						.getProgramId().equals(castOther.getProgramId())))
				&& ((this.getCreationDate() == castOther.getCreationDate()) || (this
						.getCreationDate() != null
						&& castOther.getCreationDate() != null && this
						.getCreationDate().equals(castOther.getCreationDate())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getUserId() == null ? 0 : this.getUserId().hashCode());
		result = 37 * result
				+ (getRoleId() == null ? 0 : this.getRoleId().hashCode());
		result = 37 * result
				+ (getProgramId() == null ? 0 : this.getProgramId().hashCode());
		result = 37
				* result
				+ (getCreationDate() == null ? 0 : this.getCreationDate()
						.hashCode());
		return result;
	}

}